package com.example.bootstudy.autoconfigure;

import com.example.bootstudy.bean.Car;
import com.example.bootstudy.bean.Pet;
import com.example.bootstudy.bean.User;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;

/**
 * @author XiongJianLin
 * @date Created in 2022/5/7 17:30
 */
@Import({User.class}) // import external beans
@Configuration //  // this is a configration class.
//@EnableConfigurationProperties(Car.class)
public class MyConfig {

    @Bean
    public User user01(){
        return new User("1",2);
    }
    @Bean
    public Pet pet01(){
        return new Pet();
    }
}
